var pageRootPath;
(function () {
    function getPageRootPath() {
        var scripts = document.getElementsByTagName('script');
        for (var i = 0; i < scripts.length; i++) {
            var src = scripts[i].src;
            var temp = src.split('/');
            if (temp[temp.length - 3] == 'commons' &&
                temp[temp.length - 2] == 'script' &&
                temp[temp.length - 1] == 'common.js') {
                return src.replace('/rsframe/commons/script/common.js', '');
            }
        }
        return '';
    }

    pageRootPath = getPageRootPath();
    /**
     导入jquery及基于jquery工具包
     */
    /* --------------------------------- begin --------------------------------- */
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jquery/jquery-1.10.2.min.js"></script>');
    //document.write('<script src="' +pageRootPath +'/rsframe/plugins/jtools/jquery.tool.min.js"></script>');
    /* ----------------------- ↑已压缩↑ --- ↓未压缩↓ ----------------------- */
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jtools/jquery.tool.js"></script>');
    /* --------------------------------- ended --------------------------------- */
    /**
     导入jquery.mousewheel
     */
    /* --------------------------------- begin --------------------------------- */
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jtools/jquery.mousewheel.min.js"></script>');
    /* --------------------------------- ended --------------------------------- */
    /**
     导入easyui主包
     */
    /* --------------------------------- begin --------------------------------- */
    //document.write('<link rel="stylesheet" href="' +pageRootPath+'/rsframe/plugins/jeasyui/themes/rs-default/easyui.min.css"/>');
    //document.write('<link rel="stylesheet" href="' +pageRootPath+'/rsframe/plugins/jeasyui/themes/icon.min.css"/>');
    //document.write('<script src="' +pageRootPath +'/rsframe/plugins/jeasyui/jquery.easyui.min.js"></script>');
    //document.write('<script src="' +pageRootPath +'/rsframe/plugins/jeasyui/extend/jquery.validatebox.fixed.min.js"></script>');
    //document.write('<script src="' +pageRootPath +'/rsframe/plugins/jeasyui/locale/easyui-lang-zh_CN.min.js"></script>');
    /* ----------------------- ↑已压缩↑ --- ↓未压缩↓ ----------------------- */
    document.write('<link rel="stylesheet" href="' + pageRootPath + '/rsframe/plugins/jeasyui/themes/icon.css"/>');
    document.write('<link rel="stylesheet" href="' + pageRootPath + '/rsframe/plugins/jeasyui/themes/rs-default/easyui.css"/>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/jquery.easyui.min.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jquery.validatebox.fixed.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/locale/easyui-lang-zh_CN.js"></script>');
    /* --------------------------------- ended --------------------------------- */
    /**
     导入jeasyui扩展库
     */
    /* --------------------------------- begin --------------------------------- */
    //document.write('<link rel="stylesheet" href="' +pageRootPath+'/rsframe/plugins/jeasyui/extend/jeasyui.extensions.min.css"/>');
    //document.write('<script src="' +pageRootPath +'/rsframe/plugins/jeasyui/extend/jeasyui.extensions.all.min.js"></script>');
    /* ----------------------- ↑已压缩↑ --- ↓未压缩↓ ----------------------- */
    document.write('<link rel="stylesheet" href="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.css"/>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.progressbar.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.slider.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.linkbutton.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.form.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.validatebox.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.combo.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.combobox.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.menu.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.searchbox.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.panel.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.window.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.dialog.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.layout.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.tree.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.datagrid.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.treegrid.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.combogrid.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.combotree.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.tabs.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.theme.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.icons.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.comboicons.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.gridselector.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.comboselector.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.toolbar.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jeasyui.extensions.portal.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jquery-easyui-my97/My97DatePicker/WdatePicker.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jquery-easyui-my97/jquery.my97.js"></script>');
    /* --------------------------------- ended --------------------------------- */
    /**
     导入图标样式集合
     */
    /* --------------------------------- begin --------------------------------- */
    document.write('<link rel="stylesheet" href="' + pageRootPath + '/rsframe/plugins/jeasyui/icons/icon-all.min.css"/>');
    /* --------------------------------- ended --------------------------------- */
    /**
     导入ueditor集合
     */
    /* --------------------------------- begin --------------------------------- */
    //document.write('<link rel="stylesheet" href="' +pageRootPath+'/rsframe/plugins/jeasyui/extend/jquery-easyui-ueditor/ue1_4_3-utf8-net/themes/default/css/ueditor.min.css"/>');
    //document.write('<script src="' +pageRootPath +'/rsframe/plugins/jeasyui/extend/jquery-easyui-ueditor/ue1_4_3-utf8-net/ueditor.config.min.js"></script>');
    //document.write('<script src="' +pageRootPath +'/rsframe/plugins/jeasyui/extend/jquery-easyui-ueditor/ue1_4_3-utf8-net/ueditor.all.min.js"></script>');
    //document.write('<script src="' +pageRootPath +'/rsframe/plugins/jeasyui/extend/jquery-easyui-ueditor/ue1_4_3-utf8-net/lang/zh-cn/zh-cn.min.js"></script>');
    //document.write('<script src="' +pageRootPath +'/rsframe/plugins/jeasyui/extend/jquery-easyui-ueditor/jquery.ueditor.min.js"></script>');
    /* ----------------------- ↑已压缩↑ --- ↓未压缩↓ ----------------------- */
    document.write('<link rel="stylesheet" href="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jquery-easyui-ueditor/1.4.3.3-utf8-jsp/themes/default/css/ueditor.css"/>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jquery-easyui-ueditor/1.4.3.3-utf8-jsp/ueditor.config.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jquery-easyui-ueditor/1.4.3.3-utf8-jsp/ueditor.all.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jquery-easyui-ueditor/1.4.3.3-utf8-jsp/lang/zh-cn/zh-cn.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jquery-easyui-ueditor/jquery.ueditor.js"></script>');
    /* --------------------------------- ended --------------------------------- */
    /**
     导入webuploader集合
     */
    /* --------------------------------- begin --------------------------------- */
    //document.write('<link rel="stylesheet" href="' +pageRootPath+'/rsframe/plugins/jeasyui/extend/jquery-easyui-webuploader/webuploader/webuploader.css"/>');
    //document.write('<script src="' +pageRootPath +'/rsframe/plugins/jeasyui/extend/jquery-easyui-webuploader/webuploader/webuploader.nolog.min.js"></script>');
    //document.write('<script src="' +pageRootPath +'/rsframe/plugins/jeasyui/extend/jquery-easyui-webuploader/jquery.webuploader.js"></script>');
    /* ----------------------- ↑已压缩↑ --- ↓未压缩↓ ----------------------- */
    document.write('<link rel="stylesheet" href="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jquery-easyui-webuploader/webuploader/webuploader.css"/>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jquery-easyui-webuploader/webuploader/webuploader.nolog.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jeasyui/extend/jquery-easyui-webuploader/jquery.webuploader.js"></script>');
    /* --------------------------------- ended --------------------------------- */
    /**
     导入js解密文件
     */
    /* --------------------------------- begin --------------------------------- */
    document.write('<script src="' + pageRootPath + '/rsframe/plugins/jsencrypt/jsencrypt.min.js"></script>');
    /* --------------------------------- ended --------------------------------- */
    /**
     导入系统配置
     */
    /* --------------------------------- begin --------------------------------- */
    document.write('<link rel="stylesheet" href="' + pageRootPath + '/rsframe/styles/css/global.css"/>');
    document.write('<script src="' + pageRootPath + '/config/system.config.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/commons/script/config.js"></script>');
    document.write('<script src="' + pageRootPath + '/rsframe/commons/script/dict.util.js"></script>');
    /* --------------------------------- ended --------------------------------- */

})();